thermodynamics solution